import { createRouter, createWebHashHistory } from "vue-router";

const routes = [
  {
    path: "/",
    component: () => import("../components/layout/index.vue"),
    name: "home",
    children: [],
  },
  {
    path: "/login",
    name: "Login",
    hidden: true,
    meta: {
      title: "signIn",
    },
    component: () => import("../views/login/login.vue"),
  },
  {
    path: "/403",
    name: "403",
    hidden: true,
    meta: {
      title: "没有权限",
    },
    component: () => import("../views/403.vue"),
  },
  {
    path: "/:pathMatch(.*)*",
    name: "404",
    redirect: "/",
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});
// console.log(router.getRoutes(),'asd');
export default router;
